Skip to content

deploy(pm-console): stage protected cf release - #12561

Draft
dezren39 wants to merge 2 commits into
mainfrom
codex/pm-console-cf-versions
Draft

dezren39 wants to merge 2 commits into
mainfrom
codex/pm-console-cf-versions

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Part of #12521. This draft stages only the Worker deployment slice; it does not close the umbrella issue or include the report endpoint, APK, or Android SDK work.

Changes

  • The existing .github/workflows/pm-console-edge-deploy.yml is restored to match main exactly. Its current push-to-main Wrangler publisher and rollback input remain the production path.
  • Adds a separate workflow_dispatch-only cf release workflow, restricted to main, with upload-only and release stages. Neither stage runs on a push or pull request.
  • Runs a no-secret parity job first. It compares Wrangler and cf dry-run binding names and bundle size, and checks the v1 SQLite Durable Object mapping.
  • Upload uses the pm-console-edge-upload environment and only CF_PM_EDGE_UPLOAD_API_TOKEN / CF_PM_EDGE_UPLOAD_ACCOUNT_ID. It creates a candidate version tagged with the full source SHA and workflow run, then captures the current 100% serving version. Upload never promotes.
  • Promotion uses the separate pm-console-edge-production environment and only CF_PM_EDGE_PROMOTE_API_TOKEN / CF_PM_EDGE_PROMOTE_ACCOUNT_ID. It verifies the candidate version id, tag and message, confirms its source SHA remains on main, checks that the serving version has not changed since upload, then explicitly promotes. It verifies the candidate is serving at 100% and passes the existing production health check.
  • No route is configured in cf; expose.py and its health-gated route behavior remain unchanged. The cf config maps the existing PmEdge SQLite class and assets.

Verification

  • npm ci --no-audit --no-fund: passed.
  • node build.mjs: passed.
  • Wrangler deploy --dry-run vs pinned cf beta.20 workers versions create --dry-run: passed offline with no Cloudflare credentials. Binding names matched and both reported 68.11 KiB / 19.81 KiB gzip. Output included the PM Durable Object, assets, PUBLIC_HOST and commit VERSION.
  • Workflow YAML parsed; bash -n passed for all 23 run steps; git diff --check: passed.
  • GitHub currently reports no PR checks for this branch.
  • bun test: could not run because Bun is not installed locally. The Nix-backed CLI build also was not run locally because Nix is unavailable. No release workflow was triggered.

Settings prerequisite

A read-only check of repository environments found only copilot and github-pages; neither pm-console-edge-upload nor pm-console-edge-production currently exists. GitHub creates a referenced but missing environment without protection, so do not dispatch this workflow until both environments are configured with required reviewers, a main-only deployment branch policy, and their distinct environment-only secrets. No settings were changed; only environment names and protection metadata were checked read-only. No credential values were read. The production token also needs the access required for version/deployment checks and the existing workers.dev health lookup.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant